Clean up legacy test scaffolding in cudf-polars#22535
Conversation
| engine: GPUEngine, | ||
| collect_kwargs: CollectKwargs | None = None, | ||
| polars_collect_kwargs: CollectKwargs | None = None, | ||
| cudf_collect_kwargs: CollectKwargs | None = None, |
| def _process_kwargs( | ||
| collect_kwargs: CollectKwargs | None, | ||
| polars_collect_kwargs: CollectKwargs | None, | ||
| cudf_collect_kwargs: CollectKwargs | None, | ||
| ) -> tuple[CollectKwargs, CollectKwargs]: | ||
| if collect_kwargs is None: | ||
| collect_kwargs = {} | ||
| final_polars_collect_kwargs = collect_kwargs.copy() | ||
| final_cudf_collect_kwargs = collect_kwargs.copy() | ||
| if polars_collect_kwargs is not None: # pragma: no cover; not currently used | ||
| final_polars_collect_kwargs.update(polars_collect_kwargs) | ||
| if cudf_collect_kwargs is not None: # pragma: no cover; not currently used | ||
| final_cudf_collect_kwargs.update(cudf_collect_kwargs) | ||
| return final_polars_collect_kwargs, final_cudf_collect_kwargs |
There was a problem hiding this comment.
Inlining, the function is only called once now.
| return final_polars_collect_kwargs, final_cudf_collect_kwargs | ||
|
|
||
|
|
||
| def assert_collect_raises( |
There was a problem hiding this comment.
Inlining the function is simpler to understand IMO. We now just do:
- assert_collect_raises(
- q,
- cudf_except=pl.exceptions.ComputeError,
- polars_except=pl.exceptions.InvalidOperationError,
- )
+ with pytest.raises(pl.exceptions.InvalidOperationError):
+ q.collect()
+ with pytest.raises(pl.exceptions.ComputeError):
+ q.collect(engine=pl.GPUEngine(executor="in-memory", raise_on_fail=True))|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR simplifies the cuDF Polars test assertion API by removing the ChangesAssertion helper refactor and test migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-authored-by: Lawrence Mitchell <wence@gmx.li>
|
/merge |
PR rapidsai#22048 ("Bump polars upper bound to <1.40", merged today) added the new `test_hconcat_strict_different_heights` test, which imports `assert_collect_raises`. However, PR rapidsai#22535 ("Clean up legacy test scaffolding", also merged into `release/26.06`) removed that helper. The two PRs landed on `release/26.06` without the conflict being noticed. On `main`, `test_hconcat.py` does not contain the strict-mode test, so the issue is limited to `release/26.06`.
#22558) PR #22048 (merged today) added the new `test_hconcat_strict_different_heights` test, which imports `assert_collect_raises`. However, PR #22535 (also merged today) removed that helper. The two PRs landed on `release/26.06` without the conflict being noticed. On `main`, `test_hconcat.py` does not contain the strict-mode test, so the issue is limited to `release/26.06`. Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - Matthew Murray (https://github.com/Matt711) URL: #22558
Removes `assert_collect_raises`, its callers, and the leftover `executor=`-era keyword plumbing that is no longer used anywhere else. Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - Lawrence Mitchell (https://github.com/wence-) - Matthew Roeschke (https://github.com/mroeschke) URL: rapidsai#22535
rapidsai#22558) PR rapidsai#22048 (merged today) added the new `test_hconcat_strict_different_heights` test, which imports `assert_collect_raises`. However, PR rapidsai#22535 (also merged today) removed that helper. The two PRs landed on `release/26.06` without the conflict being noticed. On `main`, `test_hconcat.py` does not contain the strict-mode test, so the issue is limited to `release/26.06`. Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - Matthew Murray (https://github.com/Matt711) URL: rapidsai#22558
Description
Removes
assert_collect_raises, its callers, and the leftoverexecutor=-era keyword plumbing that is no longer used anywhere else.